package cn.hdmis.entity;

import java.io.Serializable;

import org.apache.struts2.json.annotations.JSON;

/**
 * 
 * 项目名称：hdmis1.1
 * 类名称：ClassRoom
 * 类描述：教室
 * 创建人：Administrator
 * 创建时间：2013-2-13 下午02:49:41
 * 修改人：Administrator
 * 修改时间：2013-2-13 下午02:49:41
 * 修改备注：
 * @version 
 * 
 */
public class ClassRoom implements Serializable {
	
	private int id;
	private String noCode;
	private String name;
	private Boolean status;
	private Grade grade;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getNoCode() {
		return noCode;
	}
	public void setNoCode(String noCode) {
		this.noCode = noCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public Grade getGrade() {
		return grade;
	}
	public void setGrade(Grade grade) {
		this.grade = grade;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((grade == null) ? 0 : grade.hashCode());
		result = prime * result + id;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((noCode == null) ? 0 : noCode.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ClassRoom other = (ClassRoom) obj;
		if (grade == null) {
			if (other.grade != null)
				return false;
		} else if (!grade.equals(other.grade))
			return false;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (noCode == null) {
			if (other.noCode != null)
				return false;
		} else if (!noCode.equals(other.noCode))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		return true;
	}
	

}
